1. Field of the Invention
The present invention relates to a communication apparatus that has multiple communication interfaces and relays service processing exchanged between an external communication terminal and an external server, as well as a control method for the same, a communication system, and a non-transitory computer-readable storage medium.
2. Description of the Related Art
In recent years, among mobile phone terminals typified by smartphones, there are many terminals that are equipped with a wireless LAN function and can communicate with other devices equipped with a wireless LAN function. A function called “tethering”, in which one communication terminal operates as a wireless LAN access point in order to operate as a modem for another communication terminal, has also become prevalent. A system has been disclosed in which, by using these functions, a camera performs cloud service authentication processing via a smartphone operating as a relay apparatus (Japanese Patent Laid-Open No. 2011-39793).
Also, several connection modes are conceivable when wireless LAN communication is performed between communication terminals. Examples of conceivable connection modes include a mode of connection via an external AP (Access Point), a mode in which one communication terminal operates as the AP and the other communication terminal connects to that AP, and a so-called ad hoc communication mode of connection to a network without an AP. Japanese Patent Laid-Open No. 2006-311137 discloses a technique in which, when one terminal is to start communication with a partner terminal, the one terminal determines which communication mode is to be used for communication in the surrounding wireless environment, and notifies the partner terminal of communication parameters corresponding to the respective connection modes. There is also a technique in which communication parameters for connection using a wireless LAN are notified to the connection partner using a different communication interface such as Near Field Communication (NFC), thus simplifying wireless LAN setting and connection processing.
In light of the above background, consider a system in which during communication between a smartphone and a communication terminal (e.g., a digital camera) using a wireless LAN, the smartphone operates as the relay apparatus, and a server located in an external network performs communication with the communication terminal, as in Japanese Patent Laid-Open No. 2011-39793.
The communication modes between the smartphone and the server can be mainly divided into two modes, namely a mode of connection via an external wireless LAN AP and a mode of connection via an antenna and base station in a mobile network. In many smartphones, the connection mode for connection between the smartphone and the communication terminal using a wireless LAN is limited by the communication mode for communication between the smartphone and the server. In general, in the case where the smartphone and the server are to be connected to each other via an external wireless LAN AP, the smartphone and the communication terminal need to be connected to each other via the same wireless LAN AP. On the other hand, if the smartphone and the server are to be connected to each other via a mobile network, the smartphone and the communication terminal need to be connected to each other without going through the external wireless LAN AP.
Now consider a method in which the smartphone determines the wireless LAN connection mode, and notifies the communication terminal of communication parameters using NFC according to the above-described techniques. In this case, the smartphone notifies the communication terminal of communication parameters of the network created by the external wireless LAN AP or communication parameters of the network to be created when the smartphone operates as an AP, or both of them. The communication terminal then connects to the designated network using the notified communication parameters, and performs communication with the smartphone. As described above, the connection mode that can be used between the smartphone and the communication terminal in this system is dependent on the connection mode for connection between the smartphone and the server. For this reason, it is desirable to prevent the communication terminal from connecting to a network that cannot be actually used, by causing the smartphone to notify the communication terminal of only communication parameters of the network that corresponds to the connection mode that can be used for communication with the partner server, for example.
Japanese Patent Laid-Open No. 2006-311137 discloses a technique for determining the connection mode of the network to be formed with another terminal in the surrounding wireless environment. Considering the case where the technique disclosed in Japanese Patent Laid-Open No. 2006-311137 is applied to the aforementioned system, connectivity with the device at a higher position above the AP (connectivity with the server or the like) is not taken into account in Japanese Patent Laid-Open No. 2006-311137. For this reason, there is concern that even if the AP is not connected to the external network, for example, the communication terminal will be notified of that AP's communication parameters, thus resulting in connection in a mode in which the communication terminal and the server cannot communicate with each other.